import minRequest from '@/config/minRequest.js'
const url = '/customer'

// 获取优惠券列表
export const getCouponList = (data) => minRequest.post(url + '/favorable_info/listFavorableInfoForCustomer', data)


// 获取优惠券状态
export const checkCouponStatus = (favorableId) => minRequest.get(url +
	`/favorable_led/judgeCouponsCustomersCanClaim/${favorableId}`)

// 领取优惠券
export const collectionCoupon = (favorableId) => minRequest.get(url +
	`/favorable_led/getACoupon/${favorableId}`)

// 根据活动名称查询活动列表
export const getActivityList = (eventName) => minRequest.get(url +
	`/v103/order/orderAccordingToTheEventName/${eventName}`)

// 根据活动名称查询活动列表
export const reciveCard = (data) => minRequest.get(url +
	`/mall/coupon/checkCouponIsHave/${data.orderNum}/${data.wantNum}`)

// 根据优惠券id查询优惠券详情
export const getCouponDetail = (favorableId) => minRequest.get(url +
	`/favorable_info/getFavorableInfoById/${favorableId}`)

// 上传相册
export const createFile = (data) => minRequest.post(url + '/objectFile/create', data)